package com.ttdj.cmel.utils;

import com.ttdj.cmel.CMELApplication;
import com.umeng.analytics.MobclickAgent;

import java.util.HashMap;

/**
 * 友盟上报数据工具类
 */

public class UmengUtils {

    /**
     * 主屏banner点击事件
     *
     * @param content
     */
    public static void mainScreenBannerClick(String content, String position) {
        HashMap<String, String> map = new HashMap<String, String>();
        if (content != null && !content.isEmpty()) {
            map.put("title", content);
        }
        map.put("position", position);
        MobclickAgent.onEvent(CMELApplication.mContext, "banner_click", map);
    }

    /**
     * 游戏手柄点击事件
     */
    public static void gameSettingClick() {
        MobclickAgent.onEvent(CMELApplication.mContext, "game_setting");
    }

    /**
     * 黑米游戏盒子点击事件
     */
    public static void hmGameCenterClick() {
        MobclickAgent.onEvent(CMELApplication.mContext, "hm_game_center_click");
    }

    /**
     * 大湾区杯比赛点击事件
     */
    public static void gameCompetitionClick() {
        MobclickAgent.onEvent(CMELApplication.mContext, "game_competition_click");
    }

    /**
     * 资讯中心item点击事件
     *
     * @param content
     */
    public static void gameNewsClick(String content, String position) {
        HashMap<String, String> map = new HashMap<String, String>();
        if (content != null && !content.isEmpty()) {
            map.put("content", content);
        }
        map.put("item_position", position);
        MobclickAgent.onEvent(CMELApplication.mContext, "game_info_center_click", map);
    }
}
